import httpInstance from '@/utils/http.js';
 

// 加入购物车接口
export const insertCartApI=({skuId,count})=>{
  return httpInstance({
    url:'/member/cart',
    method:'POST',
    data:{
      skuId,count
    }
  })
}

// 获得最新接口
export const findNewCartListAPI=()=>{
  return httpInstance({
    url:'/member/cart',
    method:'GET',
  })
}
// 删除购物车。
/**
 * 
 * @param {*} ids 
 * @returns 
 */
export const delCartAPI=(ids)=>{
  return httpInstance({
    url:`/member/cart`,
    method:'DELETE',
    data:{
      ids
    }
  })
  
}
// 合并购物车接口
export const mergeCartAPI=(data)=>{
  return httpInstance({
    url:'/member/cart',
    method:'post',
    data:{
      data
    }
  })
}
 